#include "pch.h"
#include "ADOconnection.h"

void ADOconnection::DBConnection()
{
	if (!SUCCEEDED(m_pCon.CreateInstance(__uuidof(Connection))))
	{
		AfxMessageBox(_T(" ݿʧ"));
		return;
	}
	
		

	CString str = _T("Provider=SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=sa;Initial Catalog=HomanSys;Data Source=\\SQLEXPRESS");

	m_pCon->Open(_bstr_t(str), _bstr_t(_T("")), _bstr_t(_T("")), adConnectUnspecified);

}